/*
 * Singularity Engine
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.singularity.io;

import java.io.IOException;

/**
 * This is an abstraction of a data destination point in push style.
 *  
 * @author vjache
 *
 * @param <T> - a type of data items compatible with this pipe.
 */
public interface Pipe<T> {
	/**
	 * Pushes a data item to the pipe.
	 * @param aItem - a data item.
	 * @throws IOException
	 */
	void push(T aItem) throws IOException;
	/**
	 * Flushes internal buffer if any.
	 * @throws IOException
	 */
	void flush() throws IOException;
}
